package com.zy.hospitalward_management_system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.hospitalward_management_system.pojo.Doctor;
import com.zy.hospitalward_management_system.mapper.DoctorMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.hospitalward_management_system.pojo.Inpatientward;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zy
 * @since 2021-01-26
 */
@Service
public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor> implements IService<Doctor> {

    @Resource
    DoctorMapper doctorMapper;

    public List<Doctor> queryDoctorsByDepartmentId(int DepartmentId) {
        List<Doctor> doctors = doctorMapper.selectList(new QueryWrapper<Doctor>().eq("department_id", DepartmentId));
        return doctors;
    }
}